package com.wuhan.template.module.home.activity;

import android.content.Intent;
import android.support.annotation.NonNull;
import android.view.View;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.ImageView;

import com.wuhan.template.R;
import com.wuhan.template.base.BaseActivity;
import com.wuhan.template.constant.Urls;
import com.wuhan.template.utils.EventMessage;

import butterknife.BindView;
import de.greenrobot.event.EventBus;

/**
 * Created by Administrator on 2016/5/11 0011.
 */
public class ShiMingActivity extends BaseActivity {

    @BindView(R.id.shiming_webView)
    protected WebView webView;

    @BindView(R.id.shiming_back)
    protected ImageView imageBack;

    @Override
    protected int getLayoutId() {
        return R.layout.activity_shiming_home;
    }

    @Override
    protected void loadData() {
        webView.loadUrl(Urls.SHIMING_HOME);
        webView.setWebViewClient(new WebViewClient());
        webView.goBack();
    }

    @Override
    protected void initViews() {
        imageBack.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(ShiMingActivity.this,MainActivity.class);
                startActivity(intent);
                finish();
            }
        });

    }



    @Override
    protected void postEventResult(@NonNull EventMessage message) {


    }

    @Override
    protected void onDestroy() {
        super.onDestroy();

        EventBus.getDefault().unregister(this);
    }
}
